package com.fadadianqi.mall.product.dao.ibatis;

import com.fadadianqi.commons.GenericDAOSuport;
import com.fadadianqi.mall.product.dao.NavBrandDAO;
import com.fadadianqi.mall.product.model.NavBrand;
import org.springframework.stereotype.Component;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by aroot on 2/11/14.
 */
@Component
public class NavBrandDAOImpl extends GenericDAOSuport<String, NavBrand> implements NavBrandDAO {

    @Override
    protected Class<?> getObjectClass() {
        return NavBrand.class;
    }

    @Override
    protected String getTableName() {
        return "mall_nav_brand";
    }

    @Override
    public NavBrand getByNavIdAndBrandId(String navId, String brandId) {
        Map<String, Object> map = new HashMap<String, Object>();
        map.put("navId", navId);
        map.put("brandId", brandId);
        return super.getByPropertys(map);
    }
}
